1. Field of the Invention
The present invention relates to an apparatus and a method for processing images, a recording medium, and a program. In particular, the present invention relates to an apparatus, a method, a recording medium, and a program for converting an image into a low-resolution image which is still recognizable to the human visual sense.
2. Description of the Related Art
An image conversion technique for reducing image resolution is well known. Image mosaicing, one of such resolution-reduction techniques, is outlined as follows. An input image is divided into two or more blocks and then all pixels in each block are assigned a representative pixel value determined based on at least one of the pixels in the block.
FIG. 1 shows the structure of a known image converting section 1, which includes an image input section 11, a division-number setting section 12, an image-dividing section 13, and a colored-image output section 14.
The image input section 11 acquires an input image, detects the image size (the number of pixels in the horizontal direction and the number of pixels in the vertical direction), and outputs the image size to the division-number setting section 12. Along with the processing described above, the image input section 11 analyses the input image into red, green, and blue (RGB) signals, which are also passed to the division-number setting section 12 as brightness values. The image input section 11 also outputs the input image to the image-dividing section 13.
The division-number setting section 12 determines the numbers of divisions of the input image in the horizontal direction and vertical direction based on the received image size of the input image. In more detail, the division-number setting section 12 determines the numbers of horizontal and vertical divisions of the input image based on the received image size plus a predetermined size (the number of pixels in the horizontal direction and the number of pixels in the vertical direction) of a block which is the constitutional unit of a mosaic image to be produced from the input image. The numbers of divisions thus calculated are output to the image-dividing section 13.
The image-dividing section 13 divides the input image in the horizontal direction and the vertical direction according to the respective numbers of divisions received from the division-number setting section 12, and outputs the image divided into blocks to the colored-image output section 14.
The colored-image output section 14 assigns the value of the pixel at the center of gravity in each block (representative value as a brightness value) to all pixels in the block.
In short, the colored-image output section 14 assigns the representative value thus determined to all pixels in each block to cause all pixels in the block to have the same pixel value. As a result, the input image is divided into a particular number (at least two) of blocks such that the resultant image is a low-resolution mosaic image with a uniform color in each block.
FIG. 2 is a flowchart describing image conversion by the known image converting section 1.
In step S1, the image input section 11 acquires an input image, detects the image size, and outputs the image size to the division-number setting section 12. Furthermore, the image input section 11 analyses the input image into red, green, and blue (RGB) signals, which are also passed to the division-number setting section 12 as brightness values. The image input section 11 also outputs the acquired input image as is to the image-dividing section 13.
In step S2, the division-number setting section 12 determines the numbers of divisions in the horizontal direction and vertical direction of the input image based on the received image size and the predetermined block size, and outputs the calculated numbers of divisions to the image-dividing section 13.
In step S3, the image-dividing section 13 divides the input image received from the image input section 11 along the horizontal direction and vertical direction according to the respective numbers of image divisions, and outputs an image which has been divided into blocks to the colored-image output section 14.
In step S4, the colored-image output section 14 processes the input image formed of blocks received from the image-dividing section 13 such as to assign the pixel value of the pixel at the center of gravity in each block (i.e., a representative pixel value in the block) to all pixels in the block, thus converting the input image to a low-resolution mosaic image.
In step S5, the image input section 11 determines whether the next input image is available; if the next input image is available, the flow control returns to step S1. In other words, steps S1 to S5 are repeated until no next input image is available.
When it is determined that no next input image is available in step S5, the processing flow ends.
In this manner, the processing in step S4 produces a low-resolution mosaic image composed of blocks, each assigned a uniform color.
In order to produce a mosaic image from an input image, the known image converting section 1 shown in FIG. 1 determines the numbers of divisions of the input image in the horizontal direction and vertical direction based on the block size predetermined irrespective of the input image. This approach produces a mosaic image which may not be recognizable depending on the block size.
By converting an input image to a mosaic image, the known resolution reduction technique is intended to make the input image unrecognizable. In other words, the known technique is not intended to produce a low-resolution mosaic image that is still recognizable to human beings.